package com.lzl.service.impl;

import com.lzl.entity.SysRole;
import com.lzl.mapper.SysRoleMapper;
import com.lzl.service.SysRoleService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysRoleServiceImpl implements SysRoleService {
    private static final Logger LOGGER = LoggerFactory.getLogger(SysRoleServiceImpl.class);
    @Autowired
    private SysRoleMapper sysRoleMapper;

    @Override
    public List<SysRole> findAll() throws Exception {
        try{
            return sysRoleMapper.getAll();
        }catch (Exception e){
            LOGGER.error("执行SysRoleServiceImpl.findAll()方法出现异常.",e);
            throw e;
        }
    }
}
